<?php 
if(isset($_GET['url']))
{ 
	$_GET['url'] = preg_replace("/(http:\/\/)*/i", "", $_GET['url']);
} 
if(isset($_GET['url']) && preg_match('/^[^.\/]+[.]{1}[^.\/]+[.]*+[^.\/]*[.]*+[^.\/]*$/i', $_GET['url']))
{
	$_GET['url'] = strtolower($_GET['url']);
	$page_rank = @file_get_contents("http://prapi.net/pr.php?f=text&url=".$_GET['url']);
}
?>
<?php include 'layout/header.php';?>
<?php header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 98000)); ?>
		<div class="body">
			<h3>Google PageRank API</h3>
			<form action="" method="get" class="checker">
				<input type="text" name="url"/>
				<button>Check PR</button>
			</form>
			
			<script type="text/javascript"><!--
			google_ad_client = "ca-pub-5761106139279792";
			/* showsite_content2 */
			google_ad_slot = "7115280924";
			google_ad_width = 468;
			google_ad_height = 60;
			//-->
			</script>
			<script type="text/javascript"
			src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script>
			
			<?php
				if(isset($_GET['url']) && preg_match('/^[^.\/]+[.]{1}[^.\/]+[.]*+[^.\/]*[.]*+[^.\/]*$/i', $_GET['url']))
				{					
					if(strlen(trim($page_rank)) > 2)
					{
						$page_rank = 0;
					}
			?>
					<br/><br/>
					<div class="page_rank">
						<img src="http://prapi.net/pr.php?url=<?=$_GET['url']?>" alt="page rank domain <?=$_GET['url']?>" /><br/><br/>
						<strong> <?=$_GET['url']?> has pagerank : <font class="rank"><?php echo $page_rank;?></font></strong><br/><br/><br/>
						View <a href="http://www.domaintips.net/domain/<?php echo $_GET['url']?>" target="_blank"><?php echo $_GET['url']?></a> in domaintips | 
						View <a href="http://www.showsiteinfo.appspot.com/sites/<?php echo $_GET['url']?>" target="_blank"><?php echo $_GET['url']?></a> in showsiteinfo
						<br/><br/>
						<strong> Link image api : </strong><a href="http://prapi.net/pr.php?url=<?=$_GET['url']?>" target="_blank">http://prapi.net/pr.php?url=<?=$_GET['url']?></a><br/><br/>
						<strong> Link xml api : </strong><a href="http://prapi.net/pr.php?f=xml&url=<?=$_GET['url']?>" target="_blank">http://prapi.net/pr.php?f=xml&url=<?=$_GET['url']?></a><br/><br/>
						<strong> Link json api: </strong><a href="http://prapi.net/pr.php?f=json&url=<?=$_GET['url']?>" target="_blank">http://prapi.net/pr.php?f=json&url=<?=$_GET['url']?></a><br/><br/>
						<strong> Link text api: </strong><a href="http://prapi.net/pr.php?f=text&url=<?=$_GET['url']?>" target="_blank">http://prapi.net/pr.php?f=text&url=<?=$_GET['url']?></a><br/><br/><br/><br/>
						<strong>Embed code :</strong><br/>
						<textarea onclick="javascript:this.select()" class="embed_code"><a href="http://prapi.net" title="PageRank By prapi"><img alt="page rank domain <?=$_GET['url']?>" src="http://prapi.net/pr.php?url=<?=$_GET['url']?>"></a></textarea>
						<div class="adv">
							<script type="text/javascript"><!--
							google_ad_client = "ca-pub-5761106139279792";
							/* prapi */
							google_ad_slot = "9537067805";
							google_ad_width = 250;
							google_ad_height = 250;
							//-->
							</script>
							<script type="text/javascript"
							src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
							</script>
						</div>
					</div>
			<?php 
					
				}
			?>
			
			<div class="c-head">This API allows you easilly get PageRank of any indexed URL. Service requires API key, but you can quickly check PageRank using special online form. For more information and help, try these resources:</div>
			<ul>
				<li>
					<a href="javascript:void(0)" class="singn_up">Sign Up for the Google PageRank API</a>
					<div class="info">
						You don't need to pay any cost for this service at this time and don't need to sign up now .
					</div>
				</li>
				<li><a href="http://prapi.net/api_documentation_with_php.php">API Documentation</a></li>
				<li><a href="http://en.wikipedia.org/wiki/PageRank">What is Google PageRank?</a></li>
				<li><a href="http://ilpubs.stanford.edu:8090/422/1/1999-66.pdf">The PageRank citation ranking: Bringing order to the Web.</a></li>
			</ul>
			<br/>
			<script type="text/javascript"><!--
google_ad_client = "ca-pub-5761106139279792";
/* showsiteinfo_header */
google_ad_slot = "2107343656";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
		</div>
		
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/index.js"></script>	
<?php include 'layout/footer.php';?>